#pragma once

#include <string>
#include <vector>
#include <sstream>
#include <fstream>

#define TOKEN_VERTEX_POS "v"
#define TOKEN_VERTEX_NOR "vn"
#define TOKEN_VERTEX_TEX "vt"
#define TOKEN_FACE "f"

struct Vector2f{
	float x, y;
};
struct Vector3f{
	float x, y, z;
};

struct ObjMeshVertex{
	Vector3f pos;
	Vector2f texcoord;
	Vector3f normal;
};

/* This is a triangle, that we can render */
struct ObjMeshFace{
	ObjMeshVertex vertices[3];
};

/* This contains a list of triangles */
struct ObjMesh{
	std::vector<ObjMeshFace> faces;
};

/* Internal structure */
struct _ObjMeshFaceIndex{
	int pos_index[3];
	int tex_index[3];
	int nor_index[3];
};

class MeshLoaader
{
public:

	static ObjMesh LoadObjMesh(std::string filename);
};
